#ifndef _APP_BLE_H_
#define _APP_BLE_H_
#include "freertos/semphr.h"

enum
{
    IDX_SVC,
    IDX_CHAR_A,
    IDX_CHAR_VAL_A,
    IDX_CHAR_CFG_A,
    IDX_CHAR_B,
    IDX_CHAR_VAL_B,
    HRS_IDX_NB,
};

typedef struct
{
    uint8_t *prepare_buf;
    int prepare_len;
} prepare_type_env_t;

typedef struct update_data
{
    uint16_t len;
    uint8_t value[512];
} update_data_t;

typedef struct navigate_data
{
    uint16_t len;
    uint8_t value[50];
} navigate_data_t;

extern SemaphoreHandle_t update_stop_sem;
extern QueueHandle_t update_msg_queue;
extern QueueHandle_t navigate_msg_queue;

void app_ble_task(void *arg);
void app_ble_gatts_init(void);
uint8_t app_ble_gatt_send(uint8_t *val, uint16_t len);
#endif
